import pycurl
import StringIO
import Cloud

API_KEY = "x3crx8bd47hu5169jn3oa102tpktubqi"

class BoxCloud(Cloud.Cloud):
	
	def makedir(self, path):
		curlHandle = pycurl.Curl()
		curlHandle.setopt(pycurl.URL, "http://www.google.com")
		curlHandle.setopt(pycurl.HTTPHEADER, ["Accept:"])
		
		b = StringIO.StringIO()
		curlHandle.setopt(pycurl.WRITEFUNCTION, b.write)
		curlHandle.perform()

		print b.getvalue()

	def upload(self, filename):
		pass
		

	def __init__(self):
		self.curlHandle = pycurl.Curl()
		self.curlHandle.setopt(pycurl.URL, "https://api.box.com/2.0/tokens")
		self.curlHandle.setopt(pycurl.HTTPHEADER, ["Authorization: BoxAuth api_key=%s" % API_KEY])

